import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { SysTableLogQuery, SysTableLogPageResult, SysTableLogForm } from './types';

/**
 * 获取操作日志分页数据
 *
 * @param queryParams
 */
 export function getTableLogPage(
    queryParams?: SysTableLogQuery
  ): AxiosPromise<SysTableLogPageResult> {
    return request({
      url: '/api/v1/systable/page',
      method: 'get',
      params: queryParams
    });
  }

  /**
 * 获取操作日志详情
 *
 * @param id
 */
export function getTableLogForm(id: number): AxiosPromise<SysTableLogForm> {
    return request({
      url: '/api/v1/systable/' + id + '/form',
      method: 'get'
    });
  }